<template>
	<view>
		
		<view class="u-m-tb-20 searchbox u-p-20">
			<view class="search_item flex-between u-p-20 u-radius-10">
				<view class="search_item_left flex-a-c">
					<u-icon name='search' ></u-icon>
					<input class="u-m-l-10" type="text" v-model="searchWord" placeholder="搜索课程" />
				</view>
				<view class="search_item_left flex-a-c" @click="init()">
					<view class="shu u-m-lr-30">
						
					</view>
					<text>搜索</text>
				</view>
			</view>
		</view>
		
		<view class="u-font-26 u-p-20" @click="$goTo('/pagesT/class/class?isexpert=1 ')">
			<view class="flex-center sendclass u-p-20 u-radius-10">
				<image src="../../static/fb.png" mode=""></image>
				<text class="u-m-tb-10" >发布课程</text>
			</view>
		</view>
		
		<view class="classitem u-p-20" v-for="(i,index) in classlist" @click="$goTo('/pagesT/class/class?isexpert=1'+'&id=' + i.id)" > 
			<view class="flex-between u-m-tb-20">
				<text>序号</text>
				<text>{{index+1}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>课程名称</text>
				<text>{{i.c_name}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>教学领域</text>
				<text>{{i.teachingArea}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>被引用次数</text>
				<text>{{i.refcount}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>教学目标</text>
				<text>{{i.teachingAim}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>重点难点</text>
				<text>{{i.importantDifficult}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>使用学生年龄</text>
				<text>{{i.age}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>教学设备及场地</text>
				<text>{{i.teachingEtc}}</text>
			</view>
			<u-line></u-line>
			<view class="flex-between u-m-tb-20">
				<text>教学主要环节</text>
			</view>
			<text style="color: #999;">
				{{i.teachingSteps}}
			</text>
			
		</view>
		
		<u-empty v-if="classlist.length==0" ></u-empty>
		<exporttabbar ></exporttabbar>
	</view>
</template>

<script>
	import exporttabbar from '../../components/exporttabbar.vue';
	export default {
		components:{
			exporttabbar
		},
		data() {
			return {
				searchWord:'',
				classlist:[]
			};
		},
		onShow() {
			this.init()
		},
		methods:{
			init(){
				this.$api.get('/assistant/xCourse/infoList',{
					searchWord:this.searchWord
				}).then(res=>{
					this.classlist = res.data
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.searchbox{
	background-color: #fff;
	.search_item{
		background-color: #F5F5F5;
		.search_item_left{
			.shu{
				background-color: $main-color;
				height: 40rpx;
				width: 2rpx;
			}
			text{
				color: $main-color;
			}
		}
	}
}
.sendclass{
	width: 150rpx;
	background-color: $main-color;
	flex-direction: column;
	image{
		width: 50rpx;
		height: 50rpx;
	}
	color: #fff;
}
.classitem{
	background-color: #fff;
	width: 686rpx;
	box-sizing: border-box;
	margin: 30rpx auto;
}
</style>
